# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=sylpheed
pkgver=3.7.0
pkgrel=5
pkgdesc="Lightweight and user-friendly e-mail client"
url="http://sylpheed.sraoss.jp/en/"
arch="all"
license="GPL-3.0-only"
# TODO: Replace gnupg with specific gnupg subpackages that sylpheed really needs.
depends="pinentry-gtk gnupg"
makedepends="gtk+2.0-dev openldap-dev openssl1.1-compat-dev gpgme-dev"
subpackages="$pkgname-dev $pkgname-lang"
source="https://osdn.net/dl/sylpheed/$pkgname-$pkgver.tar.xz"

prepare() {
	default_prepare
	update_config_sub
	update_config_guess
}

build() {
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--enable-ldap \
		--disable-gtkspell \
		--enable-gpgme
	make
}

check() {
	make check
}

package() {
	make DESTDIR="$pkgdir" install
}

sha512sums="1f3255dd61878e9f52f78cd68a76712835c376296ddfa72034a0415f17843eaa334fb6019900b2fa18ccc600d918945febd7ffdfde91990a4e9f5c05a1609c76  sylpheed-3.7.0.tar.xz"
